class Handler:
    def __init__(self, next_handler=None):
        self.next_handler = next_handler

    def set_next(self, handler):
        self.next_handler = handler

    def handle_request(self, request):
        if self.next_handler:
            self.next_handler.handle_request(request)
        else:
            print(f"Handled by {self.__class__.__name__}")

class ConcreteHandler1(Handler):
    pass

class ConcreteHandler2(Handler):
    pass

# Usage
handler1 = ConcreteHandler1()
handler2 = ConcreteHandler2()
handler1.set_next(handler2)
handler1.handle_request("two")


'''
代码实现：
Handled by ConcreteHandler2
'''